package com.joysuch.wwyt.patrol.service.impl;

import com.joysuch.wwyt.core.bean.ResultDto;
import com.joysuch.wwyt.patrol.entity.PatrolPlanPointMapping;
import com.joysuch.wwyt.patrol.mapper.PatrolPlanPointMappingMapper;
import com.joysuch.wwyt.patrol.service.PatrolPlanPointMappingService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zr
 * @since 2022-02-28
 */
@Service
public class PatrolPlanPointMappingServiceImpl extends ServiceImpl<PatrolPlanPointMappingMapper, PatrolPlanPointMapping> implements PatrolPlanPointMappingService {

    @Autowired
    private PatrolPlanPointMappingMapper patrolPlanPointMappingMapper;

    @Override
    public Long getNumByPlanId(Long planId) {
        return patrolPlanPointMappingMapper.getNumByPlanId(planId);
    }

    @Override
    public List<ResultDto> getNumByPlanIds(List<Long> planIds) {
        return patrolPlanPointMappingMapper.getNumByPlanIds(planIds);
    }

    @Override
    public void deleteMappingByPointId(Long pointId) {
        patrolPlanPointMappingMapper.deleteMappingByPointId(pointId);
    }
}
